Figure - usALEX 5 dsDNA samples FRET


In [ ]:
from __future__ import division
import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib as mpl
import seaborn as sns
from cycler import cycler
%matplotlib inline
%config InlineBackend.figure_format='retina'  # for hi-dpi displays
sns.set_style('whitegrid')

palette = ('Paired', 10)
sns.palplot(sns.color_palette(*palette))
sns.set_palette(*palette)

Load Data


In [ ]:
data_file = 'results/usALEX-5samples-E-all-methods.csv'

In [ ]:
E = pd.read_csv(data_file, index_col=0)
E.round(2)

In [ ]:
import matplotlib
matplotlib.rcParams['svg.fonttype'] = 'none'

In [ ]:
o = E.plot.bar(table=np.round(E, 1).T, linewidth=0)
plt.ylabel('FRET (%)')
plt.gca().xaxis.set_visible(False)
#plt.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0., frameon=True);
leg = plt.legend(bbox_to_anchor=(1.02, 1), frameon=True, borderpad=1);
leg.get_frame().set_edgecolor('white')
ax = plt.gca()
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.spines['bottom'].set_visible(False)
ax.spines['left'].set_visible(False)

table = o.get_children()[-3]
table_props = table.properties()
table_cells = table_props['child_artists']
for cell in table_cells:
    cell.set_linewidth(0)
plt.savefig('figures/5dsDNA FRET usALEX.svg', dpi=300, bbox_inches='tight')

In [ ]: